//此处放专业管理界面API接口，编写者：@tangmengkai
import axios from 'axios';

const apiClient = axios.create({
    //测试用后端路径
    baseURL: 'http://localhost:8000/major/',
    headers: {
        'Content-Type': 'application/json',
    },
});

export default {
    getAll(){
        return apiClient.get('get_all/')
    },
    del_one(major_name){
        return apiClient.post('del_one/',{
            type:"del",
            del_id:major_name
        })
    },
    add_one(formData){
        return apiClient.post('add_one/',formData)
    },
    updata_one(formData,old_major_name){
        return apiClient.post('updata_one/',{
            formData,
            old_major_name
        })
    },
    getCollegesForm(){
        return apiClient.get('get_college_form/');
    },
};
